package controllers

import (
	"com.opennews.openplatform/web_api/shared"
	"github.com/gin-gonic/gin"
)

func GenerateRoutes(router *gin.Engine) {
	// Gets configured web root route name.
	routeRootGroupName := shared.ConfigService.GetAppConfig().Server.RouteRootGroupName

	// Setting all the routes.
	webApi := router.Group(routeRootGroupName)
	{
		SetAuthenticationRoutes(webApi.Group("authentication"))
		SetProductRoutes(webApi.Group("product"))
		SetUserRoutes(webApi.Group("user"))
	}
}
